package com.lingxinst.business.main.ui.home

import android.os.Bundle
import android.view.View
import androidx.appcompat.app.ActionBar
import androidx.appcompat.widget.Toolbar
import com.lingxinst.business.main.R
import com.lingxinst.business.main.databinding.FragmentHomeBinding
import com.lingxinst.farm.base.ui.BaseMvvmFragment

class HomeFragment : BaseMvvmFragment<FragmentHomeBinding, HomeViewModel>(R.layout.fragment_home) {

    override fun initTag(): String {
        return this.javaClass.simpleName
    }

    override fun getVMClass(): Class<HomeViewModel> {
       return HomeViewModel::class.java
    }

    override fun setBindingData() {
        mBinding.vm = mViewModel
    }

    override fun getToolBar(): Toolbar? {
        return mBinding.toolbar.toolbar
    }

    override fun initUIView(view: View, savedInstanceState: Bundle?,actionBar: ActionBar?) {
       actionBar ?.let {
           it.setDisplayHomeAsUpEnabled(false)
           it.title = getString(R.string.title_home)
       }
    }

    override fun setObserver() {
        super.setObserver()
    }


}